package DEEPERsource.DEEPERsource.source.corpus;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;

import parser.Parser;

import deeper.Interaction;

/**
 * Seems to duplicate the Corpus, but leave it for now for clarity
 * @author tfayruzo
 *
 */
public class Abstract extends CompositeText {
	
	public Abstract(String id, String origId){
		this.id = id;
		this.originalId = origId;
	}
	
	@Override
	public Collection<Interaction> interactions() {
		List<Interaction> result = new ArrayList<Interaction>();
		for(Text child : children){
			Collection<Interaction> i = child.interactions();
			result.addAll(i);
		}
		return result;
	}

	@Override
	public void parse(Parser parser, String...params) {
		for(Text child : children){
			child.parse(parser,params);
		}
	}
}
